﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using System.Xml.Linq;
using System.Xml.XPath;

namespace eProcurement.DAL
{
    public class XMLHelper
    {
        public static List<string> IndustryCategories( string path )
        {
            List<string> tags = new List<string>();

            using ( XmlReader reader = XmlReader.Create( path ) )
            {
                while ( reader.Read() )
                {
                    if ( reader.IsStartElement() )
                    {
                        switch ( reader.Name.ToString() )
                        {
                            case "industry":
                                tags.Add( reader.ReadString() );
                                break;
                        }
                    }
                }
            }

            return tags;
        }
    }
}
